/* 设置全局字体、过渡、文字大小 */
* {
  font-family: 'Montserrat', sans-serif;
  -webkit-transition: all .2s linear;
  transition: all .2s linear;


}

html {
  font-size: 62.5%;
  overflow-x: hidden;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

a {
  text-decoration: none;
  color: rgb(18, 18, 18);
}

nav {
  padding: 4rem 0;
}

nav .logo {
  font-size: 2rem;
  color: #fff;
  font-weight: bold;
}

nav .navbar-toggle {
  margin: 0;
}

nav .fa-navicon,
nav .fa-times,
nav .fa-user {
  margin-top: 1rem;
}

nav li a {
  color: #fff;
}

nav.active {
  background-color: #1a1919;
  padding: 0;
}

nav button i {
  color: #ffffff;
}

nav .container {
  position: relative;
}

nav .navbar-nav {
  margin: 0 3rem;
}



/* 设置媒体查询文字大小 */
@media (max-width: 991px) {

  html {
    font-size: 55%;
  }
}

@media (max-width: 768px) {

  nav {
    padding: 0;
  }

  nav .navbar-nav {
    background-color: #fff;
  }


  nav a.logo,
  nav .navbar-toggle {
    padding: 1rem 1.5rem 0;
  }

  nav .navbar-collapse {
    padding: 0 0.5rem;
  }

  nav .nav {
    margin: 0;
  }

  nav .nav a {
    padding: 1rem 1.5rem;
    color: #512a10;
  }

  .home .jumbotron {
    text-align: center;
  }


}

@media (max-width: 450px) {
  .home .jumbotron {
    text-align: center;
  }

  html {
    font-size: 50%;
  }
}


/* 美化关于模块 */
.about .container {
  padding: 3rem 0;
}

.about .container p {
  line-height: 3.5rem;
}

.about .container .btn {
  margin: 3rem 0;
}

.about .icon-box .icons {
  background-color: #afafaf;
  padding: 2.5rem 0 0.5rem;
}


/* 美化焦点图模块 */
.home {
  background: url(../images/a1.jpg) top center no-repeat;
  background-size: cover;
  background-attachment: fixed;

}

.home .jumbotron {
  overflow: hidden;
  padding: 20rem 0;
  background-color: transparent;
}

.home h1 {
  color: #f73b3b;
  /*设置文字颜色*/
  font-size: 64px;
  /*设置字体大小*/
  font-weight: bolder;
  /*设置字体粗细*/
  -webkit-animation: flicker 2s infinite;
  /*设置动画*/
}

@-webkit-keyframes flicker {

  /*创建动画*/
  0% {
    opacity: 2;
  }

  50% {
    opacity: 0.5;
  }

  100% {
    opacity: 1;
  }

}




/* 美化菜单样式 */
/* menu,reviews,post共用一个模块 */
.menu,
.reviews,
.post {
  background-color: #eae8e8;
}

.menu .thumbnail,
.reviews .thumbnail,
.post .thumbnail {
  background-color: transparent;
  padding: 3rem 2rem;
  border: none;
}

.menu .thumbnail img,
.reviews .thumbnail img {
  height: 15rem;
  border-radius: 50%;
}

.menu .thumbs:hover,
.reviews .thumbs:hover,
.post .thumbs:hover {
  background: #fff;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
  transform: translateY(-1rem);
}


/* 菜单图片和退出x的切换 */
.collapsed .fa-navicon {
  display: block;
}

.collapsed .fa-times {
  display: none;
}

button .fa-navicon {
  display: none;
}

button .fa-times {
  display: block;
}

/* x的点击旋转 */
button:active .fa-navicon {
  transform: rotate(180deg);
}

button:active .fa-times {
  transform: rotate(180deg);
}

section .page-header {
  text-align: center;
}


/* gallery 实现移动动画效果(部分关键代码) */
.gallery .thumbnail {
  position: relative;
  padding: 0;
  margin: 0;
  border: none;
  /* 写死图片大小 */
  height: 25rem;
  /* 写图片间距 */
  margin-bottom: 3rem;
  /* 去图片圆角 */
  border-radius: 0;
  /* 隐藏图片 */
  overflow: hidden;
}

/* 固定图片高度，缩小不会变形 */
.gallery .thumbnail img {
  width: 100%;
  height: 25rem;
}

.gallery .thumbnail:hover img {
  transform: translateY(-100%);
}

.gallery .thumbnail .content {
  position: absolute;
  top: 0;
  left: 0;
  text-align: center;
  border: 0.1rem solid #512a10;
  line-height: 2.8rem;
  padding: 3rem 2rem;
  background-color: #fff;
  height: 100%;
  width: 100%;
  transform: translateY(100%);
}

.gallery .thumbnail:hover .content {
  transform: translateY(0);
}


/* 联系模块 */
.contact .icons {
  border: 0.1rem solid #511010;
  padding: 4rem 2rem 3rem;
}

.contact .info {
  margin-bottom: 4rem;
}

.contact iframe {
  height: 39.5rem;
}

.contact .a {
  margin-top: 5rem;
}

.contact .map {
  margin-top: 5rem;
}

.contact .form-control {
  margin: 0.7rem 0;
  padding: 1.2rem 1.4rem;
  height: auto;
}

.post {
  padding: 0 0 4REM 0;
}

.post .thumbnail {
  padding: 0 0 3REM 0;
}

.post .imgbox {
  height: 20rem;
  overflow: hidden;
}

.post .thumbnail:hover img {
  transform: scale(0.9);
}

/* 文章模块(post)的美化样式 */
.post {
  padding: 0 0 4rem 0;
}

.post .thumbnail {
  padding: 0 0 3rem;
}

.post .imgbox {
  height: 20rem;
  overflow: hidden;
}

.post .thumbs:hover {
  transform: translateY(0);
}

.post .thumbs:hover img {
  transform: scale(0.9);
}

/* 新闻模块的美化模块样式 */
.newsletter {
  background-image: url(../images/newsletter-bg.jpg);
  background-position: top center;
  background-repeat: no-repeat;
  background-size: cover;
  color: #fff;
  padding: 2rem 0 4rem 0;
}

.newsletter h3 {
  font-size: 4rem;
  text-transform: uppercase;
}

.newsletter .input-group-btn {
  background-color: #fff;
}

.newsletter .form-control,
.newsletter .btn {
  height: 6rem;
}

/* 十、页脚模块(footer)的美化样式表 */
footer {
  padding: 2rem 0 4rem 0;
}

footer .icons i.fa {
  height: 4rem;
  width: 4rem;
  line-height: 4rem;
  border: 0.1rem solid #512a10;
  /* font-size: 2rem; */
  color: #512a10;
}

/* 十一.美化登录按钮 */
@media (min-width: 768px) {
  nav .container {
    position: relative;
  }

  .navbar-nav {
    margin-right: 3rem;
  }

  button.btnuser {
    display: block;
    position: absolute;
    right: 0;
    top: -3px;
  }
}


